package com.zhao.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

//文章类
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Article {
   @TableId(type = IdType.AUTO)
   private Integer articleId; //文章的唯一ID
   private String author; //作者名
   private String title; //标题
   private String content; //文章的内容
   private String browse;//浏览量
   private String description;//描述
   private String tags;//标签
   @TableLogic //逻辑删除注解
   private Integer deleted;
   @TableField(fill = FieldFill.INSERT)
   private Date createTime;
   @TableField(fill = FieldFill.INSERT_UPDATE)
   private Date updateTime;
   private Integer groupsId;//分组id

   @TableField(exist = false)
   private Integer hits;               //文章点击量
   @TableField(exist = false)
   private Integer commentsNum;       //文章评论量
   @TableField(exist = false)
   private Integer zan;                //文章点赞量
   @TableField(exist = false)
   private String  top;                //文章点赞量
   @TableField(exist = false)
   private String gname;               //分组名
   @TableField(exist = false)
   private Integer collection;               //分组名
}